<table id="advTable" class="table table-bordered">
    <%let advTypeEnum={1:"轮播图广告",2:"轮播图底部广告",3:"热门回收广告",4:"优品精选广告"}%>
    <thead>
    <tr>
        <th>序号</th>
        <th>标题</th>
        <th>图片</th>
        <th>类别</th>
        <th>链接</th>
        <th>排序</th>
        <th>添加时间</th>
        <th>修改时间</th>
        <th>操作</th>
    </tr>
    </thead>
    <tbody>
    <%= $.advList.map((item,index)=>(`
        <tr>
            <td>${($.pageNo-1)*$.pageSize + index+1}</td>
            <td>${item.advTitle}</td>
            <td><img height="80" src="/bang/${item.advPic}" alt=""></td>
            <td>${item.advTypeName}</td>
            <td>${item.advHref}</td>
            <td>${item.advOrder}</td>
            <td>${item.addTime}</td>
            <td>${item.upTime}</td>
            <td>
                <button  type="button" data-page="${$.pageNo}" data-id="${item._id}" class="btn btn-danger btn-sm">删除</button>
                <button type="button"  data-page="${$.pageNo}" data-id="${item._id}" class="btn btn-success btn-sm">修改</button>
            </td>
        </tr>
    `)).join("")%>


    </tbody>
</table>
<!-- /.card-body -->
<div class="card-footer clearfix" id="pageDiv">
    <ul id="pageList" class="pagination pagination-sm m-0 float-right">

        <li style="display:<%=$.pageNo===1?"none":"block"%>" class="page-item"><a data-page="1" href="javascript:;"  class="page-link">«</a></li>
        <%for(let i=1;i<=$.pageSum;i++){%>
            <li class="page-item <%= (i===$.pageNo?'active':'')%>">
                <a data-page="<%=i%>" class="page-link" href="javascript:;"><%=i%></a>
            </li>
        <%}%>
        <li style="display:<%=$.pageNo===$.pageSum?"none":"block"%>" class="page-item"><a  data-page="<%=$.pageSum%>"  href="javascript:;"  class="page-link">»</a></li>
    </ul>
</div>